#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int Fibonacci(int n) {
	if (n == 1 || n == 2) {
		return 1;
	}
	else {
		return Fibonacci(n - 1) + Fibonacci(n - 2);
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	//int i=Fibonacci(n);
	int i = 0;
	int a = 1;
	int b = 1;
	if (n == 1 || n == 2) {
		i = 1;
	}
	else {
		while (n > 2) {
			i = a + b;
			a = b;
			b = i;
			n--;
		}
	}
	printf("%d", i);
	return 0;
}
